/*
 * Copyright (c) ShaoxiongDu <Shaoxiong.dev@aliyun.com> 2021 all Rights Reserved
 */

package zh.codegym.task.task07.task0709;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

/* 
更简洁地表达自己
*/

public class Solution {

    public static void main(String[] args) throws Exception {

        //在此编写你的代码
        ArrayList<String> strings = new ArrayList<>();
        BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
        for (int i = 0; i < 5; i++) {
            strings.add(s.readLine());
        }

        int min = strings.get(0).length();
        for (int i = 1; i < 5; i++) {
            if (min > strings.get(i).length())//  →****** 应该为if(min>strings.get(i).length())*****
            {
                min = strings.get(i).length();
            }
        }
        for (int i = 0; i < 5; i++) {
            if (min == strings.get(i).length()) {
                System.out.println(strings.get(i));
            }
        }
    }
}
